package tech.aistar.service.impl;

import org.apache.ibatis.session.SqlSession;
import tech.aistar.entity.Size;
import tech.aistar.mapper.SizeMapper;
import tech.aistar.service.ISizeService;
import tech.aistar.util.MybatisUtil;

import java.util.List;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/9/7
 * @Version: 1.0
 */
public class SizeServiceImpl implements ISizeService{

    @Override
    public List<Size> findAll() {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        SizeMapper mapper = sqlSession.getMapper(SizeMapper.class);

        List<Size> list = mapper.findAll();

        MybatisUtil.close(sqlSession);
        return list;
    }
}
